<?xml version="1.0" encoding="utf-8"?>

<EFFECT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns ="urn:dsfx0">

  <CONSTANT_BUFFER>
    <NAME>cbAmbiance_Background_Camera</NAME>
  </CONSTANT_BUFFER>

  <CONSTANT_BUFFER>
    <NAME>cbAmbiance_Background_SkyMap</NAME>
  </CONSTANT_BUFFER>
  
  <SAMPLER>
    <NAME>s_SkyMap</NAME>
    <SAMPLER_TYPE>samplerCube</SAMPLER_TYPE>
    <SAMPLER_SECONDARY_TYPE>color</SAMPLER_SECONDARY_TYPE>
  </SAMPLER>

  <SAMPLER_STATE>
    <NAME>CubeSampler</NAME> 
    <MAG_FILTER>Linear</MAG_FILTER>
    <MIN_FILTER>Linear</MIN_FILTER>
    <MIP_FILTER>Linear</MIP_FILTER>
    <WRAP_U>ClampToEdge</WRAP_U>
    <WRAP_V>ClampToEdge</WRAP_V>
    <WRAP_W>ClampToEdge</WRAP_W>
    <BORDER_COLOR>0.0 0.0 0.0 1.0</BORDER_COLOR>
  </SAMPLER_STATE>

  <TECHNIQUE>
    <NAME>Default</NAME>
    <PASS>
      <NAME>Pass0</NAME>
      
      <SAMPLER_ASSIGNMENT_LIST>
        <SAMPLER_ASSIGNMENT>
          <SAMPLER>s_SkyMap</SAMPLER>
          <STATES>CubeSampler</STATES>
        </SAMPLER_ASSIGNMENT>
      </SAMPLER_ASSIGNMENT_LIST>

      <STREAMS>
        <STREAM>
          <STAGES>Vertex_Fragment</STAGES>
          <VARYING>
            <NAME>vRay</NAME>
            <TYPE>float3</TYPE>
            <QUALIFIER>smooth</QUALIFIER>
          </VARYING>
        </STREAM>
      </STREAMS>

      <SHADER_OPTIONS>
        <SHADER_OPTION>
          <NAME>BACKGROUND_RAY</NAME>
          <OPTION_VALUE>1</OPTION_VALUE>
        </SHADER_OPTION>
        <SHADER_OPTION>
          <NAME>BACKGROUND_TYPE</NAME>
          <OPTION_VALUE>4</OPTION_VALUE>
        </SHADER_OPTION>
      </SHADER_OPTIONS>

      <COMMONS>streams varyings Ambiance_Background_CBCamera</COMMONS>
      <VERTEX_STAGE>Ambiance_Background_MainVS</VERTEX_STAGE>
      <FRAGMENT_STAGE>Ambiance_Background_DeclarePS Ambiance_Background_GenericPS</FRAGMENT_STAGE>
    </PASS>
  </TECHNIQUE>

</EFFECT>
